package main

import (
	"net/http"
)

func serveAdd(w http.ResponseWriter, r *http.Request) {
	w.Write([]byte(add_page))
}


const add_page = `
<!DOCTYPE HTML>
<html>
  <head>
    <meta charset="UTF-8">
    <title>recp - Add Recipe</title>

    <!-- CCS -->

    <style type="text/css">
      .input {
        width: 300px;
      }
    </style>

  </head>
  <body>
    <h1>Nova receita</h1>
    <hr>
  <form method="post" action="/save/">
    <table>
      <tr>
        <td>Nome:</td>
        <td><input class="input" type="text" name="name" autocomplete="off" autofocus></td>
      </tr>
      <tr>
        <td>Tags:</td>
        <td><input class="input" type="text" name="tags" autocomplete="off"></td>
      </tr>
      <tr>
        <td>URL da imagem:</td>
        <td><input class="input" type="url" name="image" autocomplete="off"></td>
      </tr>
      <tr>
        <td style="vertical-align:top;">Descrição:</td>
        <td><textarea name="description" cols=60 rows=10></textarea></td>
      </tr>
    </table>
    </div>
    <div class="submit"><input type="submit" value="Gravar"></div>
  </form>
  </body>
</html>
`
